@use './variables.scss' as *;

// 旋转动画
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.rotate {
  animation: rotate 2s linear infinite;
}

// 脉冲动画
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.pulse {
  animation: pulse 2s ease infinite;
}

// 渐变边框
@keyframes borderGradient {
  0% {
    border-color: $primary-color;
  }
  50% {
    border-color: $success-color;
  }
  100% {
    border-color: $primary-color;
  }
}

.border-gradient {
  animation: borderGradient 3s infinite;
}

// 悬浮效果
.hover-up {
  transition: transform 0.3s ease;
  &:hover {
    transform: translateY(-4px);
  }
}

// 波纹效果
.ripple {
  position: relative;
  overflow: hidden;
  
  &::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
  }
  
  &:active::after {
    width: 200%;
    height: 200%;
  }
} 